package cn.yjr.vector.tools;

/**
 * @author vector
 *
 */
public abstract class ChatMessage {
	//type表示类型，1是文字，2是图片，3是语音
	private int type;
	private String timestamp;
	private String id;
	//name是patient或者doctor，表示是医生的信息还是病患的信息
	String name;
	public ChatMessage(String id,int type, String timeStamp, String filepath,String name){
		this.id = id;
		this.type = type;
		timestamp = timeStamp;
		this.name = name;
	}
	public boolean isId(String id){
		return this.id.equals(id);
	}
	public ChatMessage(String id,int type, String timeStamp, String name){
		this.id = id;
		this.type = type;
		timestamp = timeStamp;
		this.name = name;
	}
	public String getTimeStamp(){
		return timestamp;
	}
	public String getName(){
		return name;
	}
	public int getType(){
		return this.type;
	}
	public abstract void setMessage(Object mesage);
	public abstract Object getMessage();
}
